#include <iostream>
using namespace std;

int hanoi(int n, char x, char y, char z)
{
    if (n <= 0)
    {
        return 0;
    }
    // printf("n = %d, x = %c, y = %c, z = %c\n", n, x, y, z);
    hanoi(n - 1, x, z, y);
    printf("%c to %c\n", x, z);
    hanoi(n - 1, y, x, z);
    return 0;
}

int main()
{
    cout << endl
         << "学号：3170608043，姓名：石英钰" << endl
         << endl
         << "Features: 求4个的Hanoi塔问题" << endl
         << endl;

    hanoi(4, 'A', 'B', 'C');
}